package com.example.admin.brainwave.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.example.admin.brainwave.dao.DataDB1;
import com.example.admin.brainwave.dao.DataDB2;

import com.example.admin.brainwave.dao.DataDB1Dao;
import com.example.admin.brainwave.dao.DataDB2Dao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig dataDB1DaoConfig;
    private final DaoConfig dataDB2DaoConfig;

    private final DataDB1Dao dataDB1Dao;
    private final DataDB2Dao dataDB2Dao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        dataDB1DaoConfig = daoConfigMap.get(DataDB1Dao.class).clone();
        dataDB1DaoConfig.initIdentityScope(type);

        dataDB2DaoConfig = daoConfigMap.get(DataDB2Dao.class).clone();
        dataDB2DaoConfig.initIdentityScope(type);

        dataDB1Dao = new DataDB1Dao(dataDB1DaoConfig, this);
        dataDB2Dao = new DataDB2Dao(dataDB2DaoConfig, this);

        registerDao(DataDB1.class, dataDB1Dao);
        registerDao(DataDB2.class, dataDB2Dao);
    }
    
    public void clear() {
        dataDB1DaoConfig.clearIdentityScope();
        dataDB2DaoConfig.clearIdentityScope();
    }

    public DataDB1Dao getDataDB1Dao() {
        return dataDB1Dao;
    }

    public DataDB2Dao getDataDB2Dao() {
        return dataDB2Dao;
    }

}
